package com.jiyun;

import com.jiyun.entity.Result;
import com.jiyun.pojo.Duty;
import com.jiyun.pojo.Employee;
import com.jiyun.pojo.Sector;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;
//获取eureka-provider的调用地址，且具有负载均衡的能力

@FeignClient("employee-provider")
public interface EmployeeFeign {

    @RequestMapping("show")
     List<Employee> show();

    @RequestMapping("del/{id}")
    void del(@PathVariable Integer id);

    @RequestMapping("add")
    void add(@RequestBody Employee employee);

    @RequestMapping("findzhi")
    List<Duty> findzhi();

    @RequestMapping("findbu")
    List<Sector> findbu();

    @RequestMapping("update")
    void update(Employee employee);

    @RequestMapping("findPagesec")
    List<Duty> findPagesec();

    @RequestMapping("delsec/{id}")
    void delsec(@PathVariable Integer id);

    @RequestMapping("addsec")
    void addsec(Sector sector);

    @RequestMapping("updatesec")
    void updatesec(Duty duty);

    @RequestMapping("zhiwuadd")
    void zhiwuadd(Duty duty);
}


